/**
 * https://leetcode-cn.com/problems/design-hashmap/
 * 设计哈希映射
 */
class MyHashMap {
    private map: Record<number, number> = {}
    put(key: number, value: number): void {
        this.map[key] = value
    }

    get(key: number): number {
        const val = this.map[key]
        return val || (val === 0 ? val : -1)
    }

    remove(key: number): void {
        delete this.map[key]
    }
}